1 using System.Collections;
2 using
System.Collections.Generic;
3 using
UnityEngine;
4
5 public
class Boundary : MonoBehaviour {
6
7     
// Use this for initialization
8     
void Start () {
9         
10     }
11     
12     
// Update is called once per frame
13     
void Update () {
14         
15     }
16
17     
void OnTriggerExit2D(Collider2D collider){
18         
if (collider.CompareTag ("Player Bullet") || collider.CompareTag ("Object") || collider.CompareTag ("Enemy")) {
19             Destroy (collider.gameObject);
20         }
21     }
22 }


Use this for initialization

Update is called once per frame




trò chơi Cannon Siege miễn phí 12.320 lượt xem

Gõ tìm kiếm nhanh...